package nc.ui.bd.b27;

import nc.bs.framework.common.NCLocator;
import nc.itf.uap.bd.warehouse.ICargdoc;
import nc.vo.bd.b27.CargdocVO;
import nc.vo.pub.BusinessException;
import nc.vo.pub.lang.UFBoolean;


/**
 * business service ejb wrapper 
 * Created by EJBGenerator
 * based on velocity technology
 */

public class CargdocBO_Client 
{
    private static ICargdoc iCargdoc = null;

public static void celerityMaintain(String storeID, int[] param,String[] names)
    throws BusinessException{
    getICargdoc().celerityMaintainCargdocVOs(storeID,param);
}

public static boolean delete(CargdocVO vo, String parentID) throws BusinessException{
    return getICargdoc().deleteCargdocVO(vo);
}

private static ICargdoc getICargdoc() throws BusinessException {
    if(iCargdoc == null) {
        iCargdoc = (ICargdoc) NCLocator.getInstance().lookup(ICargdoc.class.getName());
    }
    return iCargdoc;
}

public static String insert(CargdocVO vo, String parentOID)
    throws BusinessException {
    return getICargdoc().insertCargdocVO(vo);
}

public static CargdocVO[] queryAllByStordoc(String StorPrimaryKey)
    throws BusinessException {
    return getICargdoc().queryAllCargdocVOsByStorePkAndIsrm(StorPrimaryKey,null);
}

public static boolean queryByStorCodeIsRmplace(String StorPrimaryKey,UFBoolean isRmplace)
    throws BusinessException {
    CargdocVO[] vos = getICargdoc().queryAllCargdocVOsByStorePkAndIsrm(StorPrimaryKey,isRmplace);
    return (vos == null || vos.length == 0 ? false : true);
}

public static void update(CargdocVO cargdoc) throws BusinessException {
    getICargdoc().updateCargdocVO(cargdoc);
}
}